package com.xuan.book.model;

import lombok.Data;

@Data
public class PageRequest {

    // 当前页面
    private Integer currentPage = 1;
    // 每页显示个数
    private Integer pageSize = 10;

    private Integer offset;     // offset = (currentPage - 1) * 10

    public Integer getOffset() {
        return (currentPage - 1) * 10;
    }
}
